package com.atguigu.rabbit.consumer.listener.topic;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author: Worker Hu
 * @CreateTime: 2024-07-23  17:12
 */
@Component
public class TopicQueue01 {

    @RabbitListener(queues = "topic_queue01")
    public void topic01(Message message){
        byte[] body = message.getBody();
        String msg = new String(body);
        System.out.println("topic01 接收到消息：" + msg);
    }
}


